export default function request(option) {
  let baseUrl = 'https://xlqd.co96.com/';
  return new Promise((resolve, reject) => {
    wx.request({
      url: baseUrl + option.url,
      method: option.method || 'get',
      data: option.data || {},
      header: {
        'Content-Type': "application/json",
        'Authorization': 'Bearer ' + wx.getStorageSync('token')
      },
      success: function(res) {
        resolve(res)
      },
      fail: function(err) {
        reject(err)
      }
    })
  })
}